home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / news / readers / nn / nn6.4.patch5 < prev    next >
Encoding:
Text File  |  1990-06-12  |  54.2 KB  |  2,195 lines

  1.          This is an official patch to nn release 6.4
  2.          -------------------------------------------
  3.  
  4.                    PATCH #5
  5.  
  6.                 Priority: MEDIUM
  7.  
  8.  
  9. These patches fix a few minor bugs in the 6.4 release, and add a few
  10. features based on patches sent to me.  Notably, problems with posting
  11. with Cnews and nncheck dumping core when "on term" is present in the
  12. init file have been fixed.
  13.  
  14. NOTICE: The following changes to initialization of string variables
  15.     are *not* backwards compatible.
  16.  
  17.  1.    Setting of string variables will now *always* skip leading and
  18.     trailing blanks and comments.
  19.  
  20.  2.    To include a leading or trailing blank, or a # in a string,
  21.     they can be escaped using a \, e.g.
  22.         set included-mark \ \#\    # set to <space><hash><space>
  23.  
  24.  3.    The normal special codes \n, \r, \t, \a, \f, \b, \e, and \\ are
  25.     now understood in strings.  Any other \x is mapped into x.
  26.  
  27.  4.    In the init file, a trailing \ on an input line specifies that
  28.     the line is continued on the next input line.  The trailing \
  29.     is removed together with the following newline.  Leading
  30.     spaces on the following line are significant.
  31.  
  32.  
  33. This may cause problems with the "included-mark" variable if it has a
  34. value like "> " (use ">\ ") or "   " (use "\  \ ").
  35.  
  36. All changes are described in the updated RELEASE_NOTES file (read that
  37. for details about this patch).  Thanks to all who reported bugs and
  38. provided fixes.
  39.  
  40. To apply this patch, use nn's :patch command, or run this command from
  41. the shell in the root of the nn source tree:
  42.     patch -p0 < this-article
  43.  
  44.  
  45. ++Kim Storm
  46.  
  47. *** ./LAST/answer.c    Tue May 29 18:36:18 1990
  48. --- answer.c    Wed Jun  6 11:42:06 1990
  49. ***************
  50. *** 29,34 ****
  51. --- 29,35 ----
  52.   export int include_art_id    = 0;
  53.   export int include_full_header    = 0;
  54.   export int orig_to_include_mask    = 0x3;
  55. + export int include_mark_blanks    = 0;
  56.   
  57.   export int empty_answer_check    = 1; /* reject replies that are not edited */
  58.   export int response_check_pause = 0; /* time to wait for background cmds */
  59. ***************
  60. *** 156,162 ****
  61.   {
  62.       if (extra_headers != NULL && *extra_headers != NUL) {
  63.       while (*extra_headers != NUL) {
  64. !         if (*extra_headers == ';') {
  65.           if (*++extra_headers == NUL) break;
  66.           fputc(NL, t);
  67.           ed_line++;
  68. --- 157,163 ----
  69.   {
  70.       if (extra_headers != NULL && *extra_headers != NUL) {
  71.       while (*extra_headers != NUL) {
  72. !         if (*extra_headers == ';' || *extra_headers == NL) {
  73.           if (*++extra_headers == NUL) break;
  74.           fputc(NL, t);
  75.           ed_line++;
  76. ***************
  77. *** 551,557 ****
  78.           putc(c, t);
  79.           if (ftell(art) >= ah->lpos) break;
  80.           prevnl++;
  81. !         continue;
  82.           }
  83.           if (prevnl) {
  84.           if (command != K_MAIL_OR_FORWARD || ftell(art) < ah->fpos)
  85. --- 552,558 ----
  86.           putc(c, t);
  87.           if (ftell(art) >= ah->lpos) break;
  88.           prevnl++;
  89. !         if (!include_mark_blanks) continue;
  90.           }
  91.           if (prevnl) {
  92.           if (command != K_MAIL_OR_FORWARD || ftell(art) < ah->fpos)
  93. ***************
  94. *** 696,702 ****
  95.       int ngroups, i;
  96.       char newsgroups[FILENAME*2];
  97.   
  98. !     init_term();
  99.       visit_init_file(0, (char *)NULL);
  100.       current_group = NULL;
  101.   
  102. --- 697,703 ----
  103.       int ngroups, i;
  104.       char newsgroups[FILENAME*2];
  105.   
  106. !     init_term(1);
  107.       visit_init_file(0, (char *)NULL);
  108.       current_group = NULL;
  109.   
  110. *** ./LAST/articles.c    Wed May 16 11:22:34 1990
  111. --- articles.c    Fri Jun  8 11:23:37 1990
  112. ***************
  113. *** 421,426 ****
  114. --- 421,427 ----
  115.        case A_SEEN:
  116.        case 0:
  117.           if (flags & ACC_DO_KILL) {
  118. +         ah->replies = db_hdr.dh_replies;
  119.           ah->sender = db_data.dh_sender;
  120.           ah->subject = db_data.dh_subject;
  121.           if (kill_article(ah)) continue;
  122. *** ./LAST/articles.h    Sat Apr 21 15:27:56 1990
  123. --- articles.h    Thu Jun  7 10:21:39 1990
  124. ***************
  125. *** 52,54 ****
  126. --- 52,55 ----
  127.   #define ACC_ON_SENDER        FLAG(12) /* match on sender (only) */
  128.   #define ACC_ON_SUBJECT        FLAG(13) /* match on subject (also) */
  129.   #define ACC_DO_KILL        FLAG(14) /* do auto-kill/select */
  130. + #define    ACC_PARSE_VARIABLES    FLAG(15) /* kill, split, etc. */
  131. *** ./LAST/aux.sh    Tue May 29 18:36:19 1990
  132. --- aux.sh    Wed Jun  6 22:06:57 1990
  133. ***************
  134. *** 1,6 ****
  135. --- 1,9 ----
  136.   
  137.   # PREFIX is inserted above this line during Make
  138.   
  139. + # make anne.jones happy (she is lost without a tty)
  140. + exec 3<&0
  141.   trap : 2 3
  142.   
  143.   PATH=/bin:$PATH
  144. *** ./LAST/conf/s-template.h    Tue May 29 18:36:20 1990
  145. --- conf/s-template.h    Tue Jun 12 09:23:42 1990
  146. ***************
  147. *** 124,136 ****
  148.   #define    HAVE_MKDIR            /* */
  149.   
  150.   /*
  151. -  *    Define NO_RENAME if the rename() system call is not available.
  152. -  *    Notice: rename() is only used by the NNTP code.
  153. -  */
  154. - /* #define NO_RENAME            /* */
  155. - /*
  156.    *    Pick one:
  157.    *    Define HAVE_GETHOSTNAME if you have a BSD like gethostname routine.
  158.    *    Define HAVE_UNAME if a system V compatible uname() is available.
  159. --- 124,129 ----
  160. ***************
  161. *** 207,212 ****
  162. --- 200,232 ----
  163.   
  164.   #define    FILENAME     256
  165.   
  166. + /*
  167. +  *    Define USE_MALLOC_H if the faster malloc() in -lmalloc should be used.
  168. +  *    This requires that -lmalloc is added to EXTRA_LIB below.
  169. +  *
  170. +  *    You can tune the malloc package through the following definitions
  171. +  *    according to the descriptions in malloc(3X):
  172. +  */
  173. + /* #define USE_MALLOC_H        /* */
  174. + /* #define MALLOC_GRAIN        sizeof(double)        /* M_GRAIN */
  175. + /* #define MALLOC_MAXFAST    (MALLOC_GRAIN*4)    /* M_MXFAST */
  176. + /* #define MALLOC_FASTBLOCKS    100            /* M_NLBLKS */
  177. + /*
  178. +  *    NNTP support requires tcp/ip with socket interface.
  179. +  *
  180. +  *    Define NO_RENAME if the rename() system call is not available.
  181. +  *    Define NO_BZERO if the bzero() function is not available.
  182. +  *    Define EXCELAN if the tcp/ip package is EXCELAN based.
  183. +  *    Define NNTP_EXTRA_LIB to any libraries required only for nntp.
  184. +  */
  185. + /* #define NO_RENAME            /* */
  186. + /* #define NO_BZERO            /* */
  187. + /* #define EXCELAN            /* */
  188. + /* #define NNTP_EXTRA_LIB -lsocket    /* */
  189.   
  190.   /*
  191.    *    Define standard compiler flags here:
  192. ***************
  193. *** 217,222 ****
  194. --- 237,244 ----
  195.   /*
  196.    *    If your system requires other libraries when linking nn
  197.    *    specify them here:
  198. +  *
  199. +  *    Standard loader flags can also be specified here!
  200.    */
  201.   
  202.   #define EXTRA_LIB
  203. *** ./LAST/doc/INSTALLATION    Sat May  5 19:02:36 1990
  204. --- doc/INSTALLATION    Wed May 30 15:55:18 1990
  205. ***************
  206. *** 347,359 ****
  207.   2) User files and programs (machince dependent, shareable)
  208.      Install the BIN_DIRECTORY programs.
  209.   
  210. ! 3) Help files and auxiliary programs (shareable)
  211. !    Install the CLIENT_DIRECTORY and HELP_DIRECTORY files and programs.
  212.   
  213.   4) Documentation (shareable)
  214.      Install the MAN pages in the proper directories.
  215.   
  216. ! 5) Online manual (shareable with 3)
  217.      Format and install the online manual in HELP_DIRECTORY.
  218.   
  219.   
  220. --- 347,362 ----
  221.   2) User files and programs (machince dependent, shareable)
  222.      Install the BIN_DIRECTORY programs.
  223.   
  224. ! 3) Auxiliary programs (configuration dependent, shareable)
  225. !    Install the CLIENT_DIRECTORY files and programs.
  226.   
  227.   4) Documentation (shareable)
  228.      Install the MAN pages in the proper directories.
  229.   
  230. ! 5) Help files (shareable)
  231. !    Install the HELP_DIRECTORY files (except online manual).
  232. ! 6) Online manual (shareable with 5)
  233.      Format and install the online manual in HELP_DIRECTORY.
  234.   
  235.   
  236. ***************
  237. *** 369,382 ****
  238.   
  239.   The `inst' script will list a menu with the following choices:
  240.   
  241. ! (1)-(5)    Install individual parts of the package.
  242.   
  243. ! (s)    Install a complete server + client package (1-5).
  244.   
  245.   (c)    Install a client which accesses all its support files and
  246.       the database via a network (2).
  247.   
  248. ! (n)    Install a client accessing only the database via a network (2-5).
  249.   
  250.   (m)    Install only the nnmaster (1).
  251.   
  252. --- 372,388 ----
  253.   
  254.   The `inst' script will list a menu with the following choices:
  255.   
  256. ! (1)-(6)    Install individual parts of the package.
  257.   
  258. ! (s)    Install a complete server + client package (1-6).
  259.   
  260.   (c)    Install a client which accesses all its support files and
  261.       the database via a network (2).
  262.   
  263. ! (h)    Install a client with local auxiliary files, but shared
  264. !     documentation and help files (2-3).
  265. ! (n)    Install a client accessing only the database via a network (2-6).
  266.   
  267.   (m)    Install only the nnmaster (1).
  268.   
  269. ***************
  270. *** 422,428 ****
  271.   in the nnmaster manual, you must now edit the GROUPS file created by
  272.   nnmaster in the DB_DIRECTORY.  If you modify the GROUPS file, you must
  273.   run the following command to register the changes to the GROUPS file.
  274. !     nnmaster -G
  275.   
  276.   When you are ready, you must start nnmaster to enter all the existing
  277.   articles into the database.  If you use the following command,
  278. --- 428,435 ----
  279.   in the nnmaster manual, you must now edit the GROUPS file created by
  280.   nnmaster in the DB_DIRECTORY.  If you modify the GROUPS file, you must
  281.   run the following command to register the changes to the GROUPS file.
  282. !     $ MASTER_DIRECTORY/nnmaster -G
  283.   
  284.   When you are ready, you must start nnmaster to enter all the existing
  285.   articles into the database.  If you use the following command,
  286. ***************
  287. *** 442,448 ****
  288.   You can also use the following command to do the initial collection of
  289.   articles from a terminal and get a nice trace of the action:
  290.   
  291. !     nnmaster -D -O45
  292.   
  293.   One or two numbers will be shown while a group is being collected.
  294.   The first number is the number of the article currently being read.
  295. --- 449,455 ----
  296.   You can also use the following command to do the initial collection of
  297.   articles from a terminal and get a nice trace of the action:
  298.   
  299. !     $ MASTER_DIRECTORY/nnmaster -D -O45
  300.   
  301.   One or two numbers will be shown while a group is being collected.
  302.   The first number is the number of the article currently being read.
  303. ***************
  304. *** 664,670 ****
  305.   After applying the patches, you will need to redo the compilation and
  306.   installation steps:
  307.   
  308. !     $ patch < PATCH_FILE    (or use nn's :patch command)
  309.       $ make all
  310.       $ su
  311.       # ./inst u
  312. --- 671,677 ----
  313.   After applying the patches, you will need to redo the compilation and
  314.   installation steps:
  315.   
  316. !     $ patch -p0 < PATCH_FILE    (or use nn's :patch command)
  317.       $ make all
  318.       $ su
  319.       # ./inst u
  320. *** ./LAST/doc/NNTP    Tue May 29 18:36:24 1990
  321. --- doc/NNTP    Tue Jun 12 09:44:57 1990
  322. ***************
  323. *** 136,141 ****
  324. --- 136,144 ----
  325.       You can define this symbol if your tcp/ip is based on the
  326.       EXCELAN implementation (no netdb.h, no getservbyname(), no
  327.       gethostbyname()).  (This belongs in the s- file!)
  328. +     You will (probably) also need to add -lsocket to NNTP_EXTRA_LIB.
  329. +     Normally it will use port 119 for nntp, but this can be modified
  330. +     through "#define IPPORT_NNTP 1150" (or similar) in the init file.
  331.   
  332.   NO_BZERO
  333.   NO_RENAME
  334. ***************
  335. *** 142,147 ****
  336. --- 145,155 ----
  337.       You can define these symbols if your system doesn't provide
  338.       the bzero() and/or rename() functions (these #define:s belong
  339.       in the s- file).
  340. + NNTP_EXTRA_LIB
  341. +     Here you can specify libraries and loader flags which are only
  342. +     needed when compiled with NNTP.  The normal EXTRA_LIB is still
  343. +     used.
  344.       
  345.           
  346.                   TUNING
  347. *** ./LAST/doc/RELEASE_NOTES    Tue May 29 18:36:24 1990
  348. --- doc/RELEASE_NOTES    Tue Jun 12 11:05:25 1990
  349. ***************
  350. *** 684,690 ****
  351. --- 684,802 ----
  352.   Title:    L and J commands should work *at least* when menu contains all art.
  353.   From:    netmgr@VENUS.CSC.FI
  354.   
  355. + Prog:    aux
  356. + Title:    Cnews' inews fails to find user id if LOGNAME is not set.
  357. + From:    kreed@telesys.cts.com (Kevin W. Reed)
  358. + Fixed:    Patch #5 [aux.sh]
  359. + Prog:    nnmaster
  360. + Title:    If active file is *temporarily* unavailable, nnmaster dies.
  361. + From:    matthew@ooc.uva.nl (Matthew Lewis)
  362. + Fixed:    Patch #5 [master.c]
  363. + Prog:    nn
  364. + Title:    Cannot subscribe to groups not in .newsrc if new-group-action=0
  365. + From:    Nick Holloway <alfie@cs.warwick.ac.uk>
  366. + Fixed:    Patch #5 [newsrc.c]
  367. + Prog:    nntp
  368. + Title:    EXCELAN code tests rhost() < 0, should be == -1
  369. + From:    Tom L. Baitz <tomb@viusys.uucp> + fix
  370. + Fixed:    Patch #5 [nntp.c]
  371. + Prog:    nn
  372. + Title:    menu-Z, read-X returns to same group
  373. + From:    dean%coplex@relay.EU.net (Dean Brooks)
  374. + Fixed:    Patch #5 [menu.c]
  375. + Prog:    inst
  376. + Title:    u)pdate installs help files twice after patch #4.
  377. + From:    rasmus%dmnboss@relay.EU.net (Rasmus Lerdorf)
  378. + Fixed:    Patch #5 [inst.sh]
  379. + Prog:    nn
  380. + Title:    Comments are not stripped from string variable assignments
  381. + From:    Pete Siemsen <siemsen@usc.edu>
  382. + Fixed:    Patch #5 [variable.c]
  383. + Prog:    nn
  384. + Title:    G or :rmail on empty file could dump core
  385. + From:    M.Maclaren@GDT.BATH.AC.UK + cause
  386. + Fixed:    Patch #5 [news.c]
  387. + Prog:    nn
  388. + Title:    clrdisp() may be used before init_term() is called.
  389. + From:    ross%contact@relay.EU.net (Ross Ridge)
  390. + Fixed:    Patch #5 [term.c]
  391. +     init_global() calls user_error() which calls clrdisp().
  392. + Prog:    nn
  393. + Title:    ^A are output to the screen around "Variable settings:" header.
  394. + From:    ross%contact@relay.EU.net (Ross Ridge)
  395. + Fixed:    Patch #5 [variable.c]
  396. + Prog:    nn
  397. + Title:    Some termcap:s requires ks/ke to be sent to use cursor keys.
  398. + From:    JW_Schilperoort@pttrnl.nl
  399. + Fixed:    Patch #5 [term.c  -- cludge]
  400. +     But on some systems, ks/ke must *not* be sent because termcap is
  401. +     broken (arrow keys are expected to send the "normal" sequences).
  402. + Prog:    nn
  403. + Title:    + {select-auto} does not work with -x option  (kill file not read)
  404. + From:    ofl@oz.rci.dk (Ole Frank Larsen)
  405. + Fixed:    Patch #5 [kill.c menu.c]
  406. + Prog:    nncheck, nntidy
  407. + Title:    dumps core if "on term" is used in init file.
  408. + From:    Peter Andersen <datpete@daimi.dk>
  409. + Fixed:    Patch #5 [answer.c newsrc.c nn.c term.c]
  410. + Prog:    nn
  411. + Title:    on term a b c... only tested for type "a"
  412. + From:    Peter Andersen <datpete@daimi.dk>
  413. + Fixed:    Patch #5 [init.c]
  414. + Prog:    inst mini-inews
  415. + Title:    ./usercheck not found when doing make install for mini-inews
  416. + From:    KFS
  417. + Fixed:    Patch #5 [inst.sh]
  418.   
  419. + Prog:    nnmaster
  420. + Title:    -E2 barfs on empty groups (and may not work at all!)
  421. + From:    chuq@apple.com
  422. + Fixed:    Patch #5 [expire.c]
  423. + Prog:    nn
  424. + Title:    Some variables have no effect when set in an entry macro
  425. + From:    pallas@Neon.Stanford.EDU (Joe Pallas)
  426. + Fixed:    Patch #5 [articles.h nn.c group.c]
  427. +     These variables are: kill, cross-post, split, and sort
  428. + Prog:    nn
  429. + Title:    Kill flags "a" and ">" does not work
  430. + From:    David Lesher <wb8foz@mthvax.cs.miami.edu>
  431. + Fixed:    Patch #5 [articles.c]
  432. + Prog:    nncheck
  433. + Title:    "set silent" in init file make nncheck shut up.
  434. + From:    grady@semprini.fx.com (Steven Grady)
  435. + Fixed:    Patch #5 [nn.c]
  436. + Prog:    nnmaster - nntp
  437. + Title:    If name server is busy, gethostbyname may fail
  438. + From:    Sjoerd Mullender <sjoerd@cwi.nl> + fix
  439. + Fixed:    Patch #5 [nntp.c]
  440. + Prog:    nn
  441. + Title:    :local save-counter %d appends NL to save counter.
  442. + From:    pak@regent.e-technik.tu-muenchen.dbp.de (Peter A. Krauss)
  443. + Fixed:    Patch #5 [new parsing of string variables]
  444.   New features since initial 6.4.0 release
  445.   ----------------------------------------
  446.   
  447. ***************
  448. *** 758,760 ****
  449. --- 870,904 ----
  450.   Title:    New variable: read-return-next-page
  451.   From:    Jeffrey (J.D.) Sparkes <JSPARKES@BNR.CA>
  452.   Added:    Patch #4 [menu.c variable.c nn.1]
  453. + Prog:    nn
  454. + Title:    New variable: ignore-mark-blank-lines
  455. + From:    KFS (requested by Uwe Doering)
  456. + Added:    Patch #5 [answer.c variable.c nn.1]
  457. + Prog:    nn
  458. + Title:    New re-layout value: 4
  459. + From:    KFS (requested by Uwe Doering)
  460. + Added:    Patch #5 [menu.c nn.1]
  461. + Prog:    nn
  462. + Title:    New g and G flags in header-lines
  463. + From:    KFS (requested by Uwe Doering)
  464. + Added:    Patch #5 [more.c nn.1]
  465. +     
  466. + Prog:    nn
  467. + Title:    Improved parsing of init file and variable settings
  468. + From:    KFS
  469. + Added:    Patch #5 [global.c init.c variable.c nn.1]
  470. +     See the header of patch #5 for more information!
  471. + Prog:    nn
  472. + Title:    New message history for the ^P command
  473. + From:    Jaap Vermeulen <jaap%sequent@relay.EU.net>
  474. + Added:    Patch #5 [term.c menu.c more.c nn.1]
  475. + Prog:    nn
  476. + Title:    New "kill-debug" variable to enable tracing of the auto-kill process.
  477. + From:    KFS
  478. + Added:    Patch #5 [kill.c variable.c nn.1]
  479. *** ./LAST/expire.c    Fri May  4 18:41:22 1990
  480. --- expire.c    Wed Jun  6 21:32:11 1990
  481. ***************
  482. *** 265,270 ****
  483. --- 265,272 ----
  484.       goto error_handler; \
  485.   }
  486.   
  487. +     if (!init_group(gh)) return 0;
  488.       old_x = old_d = new = NULL;
  489.   
  490.   #ifdef RENUMBER_DANGER
  491. *** ./LAST/global.c    Tue May 29 18:36:25 1990
  492. --- global.c    Sat Jun  2 01:06:42 1990
  493. ***************
  494. *** 350,358 ****
  495.       return NULL;
  496.   }
  497.   
  498.   /*
  499.    *     relative -- concat directory name and file name
  500.    */
  501. --- 350,384 ----
  502.       return NULL;
  503.   }
  504.   
  505. ! fgets_multi(buf, size, f)
  506. ! char *buf;
  507. ! int size;
  508. ! register FILE *f;
  509. ! {
  510. !     register char c, *s = buf;
  511. !     register int n = size;
  512. !     
  513. !     while (--n > 0) {
  514. !     c = getc(f);
  515. !     if (c == '\\') {
  516. !         if ((c = getc(f)) == NL) continue;
  517. !         *s++ = '\\';
  518. !         if (--n < 0) break;
  519. !     }
  520. !     if (c == EOF) {
  521. !         *s = NUL;
  522. !         return s != buf;
  523. !     }
  524. !     if (c == NL) {
  525. !         *s = NUL;
  526. !         return 1;
  527. !     }
  528. !     *s++ = c;
  529. !     }
  530. !     buf[30] = NUL;
  531. !     sys_error("Line too long \"%s...\" (max %d)", buf, size);
  532. ! }
  533. !     
  534.   /*
  535.    *     relative -- concat directory name and file name
  536.    */
  537. *** ./LAST/group.c    Tue May 29 18:36:26 1990
  538. --- group.c    Thu Jun  7 10:21:39 1990
  539. ***************
  540. *** 180,185 ****
  541. --- 180,187 ----
  542.       int menu_cmd, o_killed;
  543.       article_number prev_last, n;
  544.       register group_header *mg_head;
  545. +     flag_type entry_access_mode = access_mode;
  546. +     extern flag_type parse_access_flags();
  547.   
  548.   #define    menu_return(cmd) { menu_cmd = (cmd); goto menu_exit; }
  549.   
  550. ***************
  551. *** 199,204 ****
  552. --- 201,210 ----
  553.       if (unread_at_reentry) restore_unread(gh);
  554.   
  555.       m_invoke(-1);
  556. +     access_mode = entry_access_mode;
  557. +     if (access_mode & ACC_PARSE_VARIABLES)
  558. +         access_mode |= parse_access_flags();
  559.   
  560.       killed_articles = 0;
  561.   
  562. *** ./LAST/init.c    Tue May 29 18:36:26 1990
  563. --- init.c    Tue Jun 12 09:49:18 1990
  564. ***************
  565. *** 10,15 ****
  566. --- 10,18 ----
  567.   #include "term.h"
  568.   #include "keymap.h"
  569.   #include "menu.h"
  570. + #ifdef USE_MALLOC_H
  571. + #include <malloc.h>
  572. + #endif
  573.   
  574.   import char *help_directory, *db_directory;
  575.   
  576. ***************
  577. *** 16,21 ****
  578. --- 19,26 ----
  579.   export int in_init = 0;        /* true when parsing init file */
  580.   export int alt_cmd_key;        /* K_ when parse_command returns AC_KEYCMD */
  581.   
  582. + export long initial_memory_break;    /* for :debug statistics */
  583.   static int init_err = 0;    /* errors in init file */
  584.   
  585.   
  586. ***************
  587. *** 31,36 ****
  588. --- 36,42 ----
  589.       if (in_init) {
  590.       fmt = va_arg1(char *);
  591.   
  592. +     visual_off();
  593.       printf("init error: ");
  594.       vprintf(fmt, va_args2toN);
  595.       putchar(NL);
  596. ***************
  597. *** 53,59 ****
  598.       if (cmd == NULL) return cmd;
  599.   
  600.       while (*cmd && isspace(*cmd)) cmd++;
  601. -     if (*cmd == '\\' && isspace(cmd[1])) cmd++;
  602.       if (*cmd == NUL || *cmd == NL) return NULL;
  603.   
  604.       return cmd;
  605. --- 59,64 ----
  606. ***************
  607. *** 76,90 ****
  608.       argc = 0;
  609.       argvec[0] = cmd;
  610.   
  611. -     if (in_init)
  612. -     while (*cmd) {
  613. -         if (*cmd == NL) {
  614. -         *cmd = NUL;
  615. -         break;
  616. -         }
  617. -         cmd++;
  618. -     }
  619.       return 1;
  620.   }
  621.   
  622. --- 81,86 ----
  623. ***************
  624. *** 132,138 ****
  625.   FILE **seq_hook_ptr;
  626.   {
  627.       FILE *init;
  628. !     char cmdbuf[512], *cmd, *term;
  629.       extern char *term_name;
  630.   
  631.       /* use cmdbuf temporarily (to handle @ expansion) */
  632. --- 128,134 ----
  633.   FILE **seq_hook_ptr;
  634.   {
  635.       FILE *init;
  636. !     char cmdbuf[1024], *cmd, *term;
  637.       extern char *term_name;
  638.   
  639.       /* use cmdbuf temporarily (to handle @ expansion) */
  640. ***************
  641. *** 151,157 ****
  642.       init = open_file(name, OPEN_READ);
  643.       if (init == NULL) return;
  644.   
  645. !     while (fgets(cmdbuf, 512, init)) {
  646.       if (only_seq) {
  647.           if (!is_sequence(cmdbuf)) continue;
  648.           *seq_hook_ptr = init;
  649. --- 147,153 ----
  650.       init = open_file(name, OPEN_READ);
  651.       if (init == NULL) return;
  652.   
  653. !     while (fgets_multi(cmdbuf, 1024, init)) {
  654.       if (only_seq) {
  655.           if (!is_sequence(cmdbuf)) continue;
  656.           *seq_hook_ptr = init;
  657. ***************
  658. *** 458,465 ****
  659. --- 454,486 ----
  660.   
  661.   static print_debug_info()
  662.   {
  663. + #ifdef USE_MALLOC_H
  664. +     struct mallinfo mallinfo(), mi;
  665. + #endif
  666. +     static long prev_mem = 0;
  667. +     long cur_mem;
  668. +     extern char *sbrk();
  669.       clrdisp();
  670.       printf("group=%s, nart=%ld\n\r", current_group->group_name, n_articles);
  671. +     cur_mem = (((long)sbrk(0)) - initial_memory_break)/1024;
  672. +     printf("\nMemory usage: %ldk, previous: %ldk, change: %ldk\n\r",
  673. +        cur_mem, prev_mem, cur_mem - prev_mem);
  674. +     prev_mem = cur_mem;
  675. + #ifdef USE_MALLOC_H
  676. +     mi = mallinfo();
  677. +     printf("\nMalloc info.  Total allocation: %d\n\r", mi.arena);
  678. +     printf("Ordinary blocks: %d, space in use: %d, space free: %d\n\r",
  679. +        mi.ordblks, mi.uordblks, mi.fordblks);
  680. +     printf("Small blocks: %d, space in use: %d, space free: %d\n\r",
  681. +        mi.smblks, mi.usmblks, mi.fsmblks);
  682. +     printf("Holding blocks: %d, space in headers: %d\n\r",
  683. +        mi.hblks, mi.hblkhd);
  684. + #endif
  685.       any_key(0);
  686.   }
  687.   
  688. ***************
  689. *** 467,472 ****
  690. --- 488,494 ----
  691.   char *str;
  692.   {
  693.       char **av;
  694. +     char buf[1024];
  695.   
  696.       if (!in_init) {
  697.       msg(str);
  698. ***************
  699. *** 473,482 ****
  700.       return;
  701.       }
  702.   
  703. !     printf("\r%s:", str);
  704. !     for (av = argvec; *av; av++)
  705. !         printf(" %s", *av);
  706. !     putchar(NL);
  707.   }
  708.   
  709.   
  710. --- 495,506 ----
  711.       return;
  712.       }
  713.   
  714. !     buf[0] = NUL;
  715. !     for (av = argvec; *av; av++) {
  716. !     strcat(buf, " ");
  717. !     strcat(buf, *av);
  718. !     }
  719. !     init_message("%s: %s", str, buf);
  720.   }
  721.   
  722.   
  723. ***************
  724. *** 719,725 ****
  725.   FILE *f;
  726.   {
  727.       register char *cp;
  728. !     char buf[256];
  729.   
  730.       if (argv(1) == NULL) goto on_err;
  731.   
  732. --- 743,749 ----
  733.   FILE *f;
  734.   {
  735.       register char *cp;
  736. !     char buf[1024];
  737.   
  738.       if (argv(1) == NULL) goto on_err;
  739.   
  740. ***************
  741. *** 769,775 ****
  742.           int i;
  743.   
  744.           for (i = 2; argv(i) != NULL; i++)
  745. !         if (strcmp(argv(2), term_name) == 0) return;
  746.           break;
  747.       }
  748.   
  749. --- 793,799 ----
  750.           int i;
  751.   
  752.           for (i = 2; argv(i) != NULL; i++)
  753. !         if (strcmp(argv(i), term_name) == 0) return;
  754.           break;
  755.       }
  756.   
  757. ***************
  758. *** 786,792 ****
  759.       goto on_err;
  760.       }
  761.   
  762. !     while (fgets(buf, 256, f) != NULL) {
  763.       for (cp = buf; *cp && isascii(*cp) && isspace(*cp); cp++);
  764.       if (strncmp(cp, "end", 3) == 0) return;
  765.       }
  766. --- 810,816 ----
  767.       goto on_err;
  768.       }
  769.   
  770. !     while (fgets_multi(buf, 1024, f) != NULL) {
  771.       for (cp = buf; *cp && isascii(*cp) && isspace(*cp); cp++);
  772.       if (strncmp(cp, "end", 3) == 0) return;
  773.       }
  774. ***************
  775. *** 1087,1092 ****
  776. --- 1111,1117 ----
  777.       CASE( "rmail" ) {
  778.           import char *mail_box;
  779.           group_header *orig_group;
  780. +         int rv;
  781.   
  782.           if (mail_box == NULL) {
  783.           msg("'mail' path not defined");
  784. ***************
  785. *** 1094,1103 ****
  786.           }
  787.   
  788.           orig_group = current_group;
  789. !         folder_menu(mail_box, 2);
  790.           init_group(orig_group);
  791.   
  792. !         return AC_REDRAW;
  793.       }
  794.   
  795.       CASE( "mkdir" ) {
  796. --- 1119,1128 ----
  797.           }
  798.   
  799.           orig_group = current_group;
  800. !         rv = folder_menu(mail_box, 2);
  801.           init_group(orig_group);
  802.   
  803. !         return rv == ME_NO_REDRAW ? ok_val : AC_REDRAW;
  804.       }
  805.   
  806.       CASE( "mkdir" ) {
  807. *** ./LAST/inst.sh    Tue May 29 18:36:27 1990
  808. --- inst.sh    Wed Jun  6 19:32:40 1990
  809. ***************
  810. *** 42,47 ****
  811. --- 42,50 ----
  812.       ;;
  813.   
  814.   inews)
  815. +     if [ ! -f ./usercheck ] ; then
  816. +         ln ../usercheck usercheck
  817. +     fi
  818.       if [ ! -d "${INEWS_DIR}"/. ]
  819.       then
  820.           ../inst mkdir ${INEWS_DIR} 755 || exit 1
  821. ***************
  822. *** 159,165 ****
  823.       fi
  824.       if [ -f "$LIB/aux" ]
  825.       then
  826. !         OPT="$OPT aux help"
  827.       fi
  828.       if [ -d "$HELP" ]
  829.       then
  830. --- 162,168 ----
  831.       fi
  832.       if [ -f "$LIB/aux" ]
  833.       then
  834. !         OPT="$OPT aux"
  835.       fi
  836.       if [ -d "$HELP" ]
  837.       then
  838. *** ./LAST/kill.c    Wed May 16 11:23:40 1990
  839. --- kill.c    Fri Jun  8 11:47:38 1990
  840. ***************
  841. *** 10,15 ****
  842. --- 10,17 ----
  843.   
  844.   export int killed_articles;
  845.   export int dflt_kill_select = 30;
  846. + export int kill_file_loaded = 0;
  847. + export int kill_debug = 0;
  848.   
  849.   char KILL_FILE[] =     "kill";
  850.   char COMPILED_KILL[] =    "KILL.COMP";
  851. ***************
  852. *** 137,142 ****
  853. --- 139,146 ----
  854.       if (do_select && (flag & AUTO_SELECT) == 0) goto failed;
  855.       if (do_kill && (flag & AUTO_KILL) == 0) goto failed;
  856.   
  857. +     if (kill_debug) print_kill(kl);
  858.       if (flag & KILL_UNLESS_MATCH)
  859.           *unlessp = 1;
  860.   
  861. ***************
  862. *** 174,179 ****
  863. --- 178,187 ----
  864.       break;
  865.   
  866.        match:
  867. +     if (kill_debug) {
  868. +         pg_next();
  869. +         printf("%sMATCH\n", flag & AND_MATCH ? "PARTIAL " : "");
  870. +     }        
  871.       if (flag & AND_MATCH) continue;
  872.       break;
  873.       }
  874. ***************
  875. *** 187,192 ****
  876. --- 195,209 ----
  877.       register kill_list_entry *kl;
  878.       int unless_match = 0;
  879.   
  880. +     if (kill_debug) {
  881. +     clrdisp();
  882. +     pg_init(0, 1);
  883. +     pg_next();
  884. +     so_printf("\1KILL: %s: %s%-.40s (%d)\1",
  885. +           ah->sender,  ah->replies & 0x80 ? "Re: " : "",
  886. +           ah->subject, ah->replies & 0x7f);
  887. +     }
  888.       kl = exec_kill((kill_list_entry *)(current_group->kill_list), ah,
  889.              &unless_match, 0, 0);
  890.       if (kl == NULL && group_regexp_table != NULL) {
  891. ***************
  892. *** 197,218 ****
  893.       kl = exec_kill(global_kill_list, ah, &unless_match, 0, 0);
  894.   
  895.       if (kl != NULL) {
  896. !     if (kl->kill_flag & AUTO_KILL) {
  897. !         killed_articles++;
  898. !         return 1;
  899. !     }
  900.   
  901.       if (kl->kill_flag & AUTO_SELECT)
  902.           ah->attr = A_AUTO_SELECT;
  903. !     return 0;
  904.       }
  905.   
  906. !     if (unless_match) {
  907. !     killed_articles++;
  908. !     return 1;
  909. !     }
  910.   
  911.       return 0;
  912.   }
  913.   
  914.   
  915. --- 214,237 ----
  916.       kl = exec_kill(global_kill_list, ah, &unless_match, 0, 0);
  917.   
  918.       if (kl != NULL) {
  919. !     if (kl->kill_flag & AUTO_KILL)
  920. !         goto did_kill;
  921.   
  922.       if (kl->kill_flag & AUTO_SELECT)
  923.           ah->attr = A_AUTO_SELECT;
  924. !     goto no_kill;
  925.       }
  926.   
  927. !     if (unless_match) goto did_kill;
  928.   
  929. +  no_kill:
  930. +     if (kill_debug) pg_end();
  931.       return 0;
  932. +  did_kill:
  933. +     if (kill_debug) pg_end();
  934. +     killed_articles++;
  935. +     return 1;
  936.   }
  937.   
  938.   
  939. ***************
  940. *** 821,826 ****
  941. --- 840,846 ----
  942.   
  943.       fclose(killf);
  944.   
  945. +     kill_file_loaded = 1;
  946.       return 1;
  947.   
  948.    err:
  949. ***************
  950. *** 895,900 ****
  951. --- 915,921 ----
  952.   
  953.       if (kill_patterns != NULL) freeobj(kill_patterns);
  954.       if (kill_tab != NULL) freeobj(kill_tab);
  955. +     kill_file_loaded = 0;
  956.   }
  957.   
  958.   
  959. ***************
  960. *** 918,927 ****
  961.              flag & AUTO_KILL ? " UNLESS" :
  962.              flag & AUTO_SELECT ? "" : "KEEP");
  963.   
  964. !     printf("%s '%.35s'%s\n",
  965.          flag & ON_SUBJECT ? "SUBJECT" :
  966. !        flag & ON_SENDER ? "NAME" : "????",
  967.   
  968.          kl->kill_pattern,
  969.   
  970.          flag & KILL_CASE_MATCH ?
  971. --- 939,950 ----
  972.              flag & AUTO_KILL ? " UNLESS" :
  973.              flag & AUTO_SELECT ? "" : "KEEP");
  974.   
  975. !     printf("%s '%s%.35s'%s\n",
  976.          flag & ON_SUBJECT ? "SUBJECT" :
  977. !        flag & ON_SENDER ? "NAME" :
  978. !        flag & ON_ANY_REFERENCES ? "ANY REF" : "????",
  979.   
  980. +        flag & ON_FOLLOW_UP ? "Re: " : "",
  981.          kl->kill_pattern,
  982.   
  983.          flag & KILL_CASE_MATCH ?
  984. *** ./LAST/macro.c    Thu Apr 26 20:47:51 1990
  985. --- macro.c    Tue Jun 12 09:49:19 1990
  986. ***************
  987. *** 319,325 ****
  988.   char *id;
  989.   FILE *f;
  990.   {
  991. !     char line[256], *lp, skip;
  992.       int type = 0;
  993.   
  994.       if (id) {
  995. --- 319,325 ----
  996.   char *id;
  997.   FILE *f;
  998.   {
  999. !     char line[1024], *lp, skip;
  1000.       int type = 0;
  1001.   
  1002.       if (id) {
  1003. ***************
  1004. *** 360,366 ****
  1005.       skip = 0;
  1006.       initial_set_commands = (cur_m == NMACRO);
  1007.   
  1008. !     while (fgets(line, 256, f)) {
  1009.       for (lp = line; *lp && isspace(*lp); lp++);
  1010.       if (*lp == NUL) continue;
  1011.       if (*lp == ')' || strncmp(lp, "end", 3) == 0) goto out;
  1012. --- 360,366 ----
  1013.       skip = 0;
  1014.       initial_set_commands = (cur_m == NMACRO);
  1015.   
  1016. !     while (fgets_multi(line, 1024, f)) {
  1017.       for (lp = line; *lp && isspace(*lp); lp++);
  1018.       if (*lp == NUL) continue;
  1019.       if (*lp == ')' || strncmp(lp, "end", 3) == 0) goto out;
  1020. *** ./LAST/man/nn.1.A    Tue May 22 12:53:44 1990
  1021. --- man/nn.1.A    Tue Jun 12 11:05:47 1990
  1022. ***************
  1023. *** 234,240 ****
  1024.   Redraw screen (Same as ^L).
  1025.   .TP
  1026.   \&\fB^P\fP    {\fBmessage\fP}
  1027. ! Repeat the last message shown on the message line.
  1028.   .TP
  1029.   \&\fB!\fP    {\fBshell\fP}
  1030.   Shell escape.  The user is prompted for a command which is executed
  1031. --- 234,242 ----
  1032.   Redraw screen (Same as ^L).
  1033.   .TP
  1034.   \&\fB^P\fP    {\fBmessage\fP}
  1035. ! Repeat the last message shown on the message line.  The command can be
  1036. ! repeated to successively show previous messages (the maximum number of
  1037. ! saved messages is controlled via the \fBmessage-history\fP variable.)
  1038.   .TP
  1039.   \&\fB!\fP    {\fBshell\fP}
  1040.   Shell escape.  The user is prompted for a command which is executed
  1041. ***************
  1042. *** 259,264 ****
  1043. --- 261,267 ----
  1044.   .LP
  1045.   \fBRelated and basic variables\fP:
  1046.   backup, backup-suffix, confirm-auto-quit, expert, mail,
  1047. + message-history,
  1048.   new-group-action, newsrc, quick-count.
  1049.   .SH SELECTION MODE
  1050.   In selection mode, the screen is divided into four parts: the header
  1051. *** ./LAST/man/nn.1.B    Tue May 29 18:36:28 1990
  1052. --- man/nn.1.B    Tue Jun 12 11:05:47 1990
  1053. ***************
  1054. *** 566,580 ****
  1055.   Specify an auto-select \fB+\fP or an auto-kill \fB!\fP entry,
  1056.   respectively.  If neither are used, the article is neither selected
  1057.   nor killed which is useful in combination with the `\fB~\fP' flag.
  1058. - .LP
  1059. - For each \fIstring\fP, the \fIflags\fP field must contain the following
  1060. - characters defining the interpretation of the corresponding
  1061. - \fIstring\fP:
  1062.   .TP
  1063. ! \fBn\fP or \fBs\fP (mandatory)
  1064.   .br
  1065.   Specify whether the corresponding string applies to the name \fBn\fP
  1066. ! or to the subject \fBs\fP of an article.
  1067.   .TP
  1068.   \fB/\fP (optional)
  1069.   .br
  1070. --- 566,584 ----
  1071.   Specify an auto-select \fB+\fP or an auto-kill \fB!\fP entry,
  1072.   respectively.  If neither are used, the article is neither selected
  1073.   nor killed which is useful in combination with the `\fB~\fP' flag.
  1074.   .TP
  1075. ! \fB>\fP (optional)
  1076. ! When used with a subject (flag \fBs\fP), the kill entry only matches
  1077. ! follow-ups to that subject (i.e. where the Subject: line starts with
  1078. ! Re:).  For example, to kill all "Re:"'s in rec.humor use the following
  1079. ! kill entry: rec.humor:!>s/:.
  1080. ! .TP
  1081. ! \fBn\fP or \fBs\fP or \fBa\fP (mandatory)
  1082.   .br
  1083.   Specify whether the corresponding string applies to the name \fBn\fP
  1084. ! or to the subject \fBs\fP of an article.  If flag \fBa\fP is used, the
  1085. ! corresponding string is ignored (but must be present), and the entry
  1086. ! applies to articles with a non-empty References: line.
  1087.   .TP
  1088.   \fB/\fP (optional)
  1089.   .br
  1090. *** ./LAST/man/nn.1.C    Tue May 29 18:36:29 1990
  1091. --- man/nn.1.C    Tue Jun 12 11:05:47 1990
  1092. ***************
  1093. *** 113,123 ****
  1094.   .br
  1095.       \fBset\fP \fIvariable string\fP
  1096.   .br
  1097. ! Except for file and directory names, the
  1098. ! .I string
  1099.   value starts at the first non-blank character after the variable name
  1100. ! and continues to the end of the line \fIincluding all trailing
  1101. ! blanks on the line\fP!
  1102.   .LP
  1103.   Key variables control the keys used to control special functions
  1104.   during user input such as line editing and completion.  They are set
  1105. --- 113,132 ----
  1106.   .br
  1107.       \fBset\fP \fIvariable string\fP
  1108.   .br
  1109. ! Normally, the \fIstring\fP value assigned to the \fIvariable\fP
  1110.   value starts at the first non-blank character after the variable name
  1111. ! and ends with the last non-blank character (excluding comments) on the
  1112. ! line.  To include leading or trailing blanks, or the comment start
  1113. ! symbol, #, in the string they must be escaped using a backslash `\e',
  1114. ! e.g. to set \fBincluded-mark\fP to the string " # ", the following
  1115. ! assignment can be used:
  1116. ! .sp 0.5v
  1117. !     set included-mark  \e\ \e#\e\ \ \ # blank-#-blank
  1118. ! .sp 0.5v
  1119. ! To include a backslash in the string, it must be duplicated `\e\e'.
  1120. ! A backslash may also be used to include the following special
  1121. ! characters in the string: \ea=alarm, \eb=backspace, \ee=escape,
  1122. ! \ef=form-feed, \en=new-line, \er=return, \et=tab.
  1123.   .LP
  1124.   Key variables control the keys used to control special functions
  1125.   during user input such as line editing and completion.  They are set
  1126. ***************
  1127. *** 464,469 ****
  1128. --- 473,483 ----
  1129.   header of the original article.  If it is not set, it only includes
  1130.   the header when the article is forwarded without being edited.
  1131.   .TP
  1132. + \fBinclude-mark-blank-lines\fP    (boolean, default false)
  1133. + When set, the \fBincluded-mark\fP is placed on blank lines in included
  1134. + articles.  Otherwise, blank lines are left blank (to make it easy to
  1135. + delete whole paragraphs with `d}' in vi and `C-@ M-] C-W' in emacs).
  1136. + .TP
  1137.   \fBincluded-mark\fP \fIstring\fP    (string, default ">")
  1138.   This string is prefixed to all lines in the original article that are
  1139.   included in a reply or a follow-up.  (Now you have the possibility to
  1140. ***************
  1141. *** 484,489 ****
  1142. --- 498,507 ----
  1143.   .I kill
  1144.   file.
  1145.   .TP
  1146. + \fBkill-debug\fP        (boolean, default false)
  1147. + When set, \fInn\fP will display a trace of the auto-kill/select
  1148. + process on entry to a group.
  1149. + .TP
  1150.   \fBkill-key\fP \fIkey\fP    (key, default tty kill key)
  1151.   The key which deletes the current line
  1152.   when \fInn\fP is prompting for a string, e.g. a file name.
  1153. ***************
  1154. *** 587,592 ****
  1155. --- 605,614 ----
  1156.   of the terminal if possible) to indicate the end of the overlap (see the
  1157.   \fBoverlap\fP variable).
  1158.   .TP
  1159. + \fBmessage-history\fP \fIN\fP    (integer, default 15)
  1160. + Specifies the maximum number, \fIN\fP, of older messages which can be
  1161. + recalled with the \fB^P\fP {\fBmessage\fP} command.
  1162. + .TP
  1163.   \fBmin-window\fP \fIsize\fP    (integer, default 7)
  1164.   When the \fBwindow\fP variable is not set, \fInn\fP will clear the
  1165.   screen to preview an article if there are less than \fIsize\fP unused
  1166. ***************
  1167. *** 766,771 ****
  1168. --- 788,794 ----
  1169.       1:  A single `>' is shown if the Subject contains Re:.
  1170.       2:  The number of references is shown as `n>'
  1171.       3:  A single Re: is shown.
  1172. +     4:  If any references use layout 0, else layout 1.
  1173.   .fi
  1174.   .TP
  1175.   \fBread-return-next-page\fP    (boolean, default false)
  1176. *** ./LAST/man/nn.1.D    Tue May 22 12:53:49 1990
  1177. --- man/nn.1.D    Tue Jun 12 11:05:47 1990
  1178. ***************
  1179. *** 33,38 ****
  1180. --- 33,42 ----
  1181.   .br
  1182.   \fBF\fP    From:
  1183.   .br
  1184. + \fBG\fP    Newsgroup:    (current group)
  1185. + .br
  1186. + \fBg\fP    Newsgroup:    (current group if cross-posted or merged)
  1187. + .br
  1188.   \fBI\fP    Message-Id:
  1189.   .br
  1190.   \fBK\fP    Keywords:
  1191. ***************
  1192. *** 720,730 ****
  1193.   \&\fI.nn\fP directory.  The private init file is read after the global
  1194.   init file to allow the user to change the default setup.
  1195.   .LP
  1196.   The init file may contain the following types of commands (and data):
  1197.   .TP
  1198.   .B Comments
  1199.   Empty lines and lines with a # character as the first non-blank
  1200. ! character are ignored.
  1201.   .TP
  1202.   .B Variable settings
  1203.   You can
  1204. --- 724,740 ----
  1205.   \&\fI.nn\fP directory.  The private init file is read after the global
  1206.   init file to allow the user to change the default setup.
  1207.   .LP
  1208. + The init file is parsed one line at a time.  If a line ends with a
  1209. + backslash `\e', the backslash is ignored, and the following line is
  1210. + appended to the current line.
  1211. + .LP
  1212.   The init file may contain the following types of commands (and data):
  1213.   .TP
  1214.   .B Comments
  1215.   Empty lines and lines with a # character as the first non-blank
  1216. ! character are ignored.  Except where # has another meaning defined by
  1217. ! the command syntax (e.g. multi-keys are named #\fIn\fP), trailing
  1218. ! comments on input lines are ignored.
  1219.   .TP
  1220.   .B Variable settings
  1221.   You can
  1222. *** ./LAST/master.c    Tue May 29 18:36:31 1990
  1223. --- master.c    Wed May 30 15:46:23 1990
  1224. ***************
  1225. *** 699,708 ****
  1226.           continue;
  1227.       }
  1228.   #endif
  1229. !     age_active = file_exist(news_active, "fr");
  1230. !     if (!use_nntp && age_active == (time_t)0)
  1231. !         sys_error("Cannot access active file");
  1232.   
  1233.       if (unconditional) {
  1234.           master.last_scan = age_active - 60;
  1235. --- 699,711 ----
  1236.           continue;
  1237.       }
  1238.   #endif
  1239. !     temp=2;
  1240. !     while ((age_active = file_exist(news_active, "fr")) == (time_t)0) {
  1241. !         if (use_nntp) break;
  1242. !         if (--temp < 0)
  1243. !         sys_error("Cannot access active file");
  1244. !         sleep(5);    /* maybe a temporary glitch ? */
  1245. !     }
  1246.   
  1247.       if (unconditional) {
  1248.           master.last_scan = age_active - 60;
  1249. *** ./LAST/menu.c    Tue May 29 18:36:33 1990
  1250. --- menu.c    Wed Jun  6 19:21:53 1990
  1251. ***************
  1252. *** 91,96 ****
  1253. --- 91,99 ----
  1254.        case 3:
  1255.       so_printf("Re: ");
  1256.       return 4;
  1257. +      case 4:
  1258. +     if (level == 0 && re) level++;
  1259. +     break;
  1260.       }
  1261.   
  1262.       if (level < 10) {
  1263. ***************
  1264. *** 269,275 ****
  1265. --- 272,282 ----
  1266.       register article_number i;
  1267.       register article_header *ah, **ahp;
  1268.       int count = 0, o_cura;
  1269. +     extern int kill_file_loaded;
  1270.   
  1271. +     if (mode == 1 && re == NULL) 
  1272. +     if (!kill_file_loaded && !init_kill()) return 0;
  1273.       o_cura = cura;
  1274.   
  1275.       for (i = 0, ahp = articles; i < n_articles; i++, ahp++) {
  1276. ***************
  1277. *** 437,443 ****
  1278.               if (ah->attr == 0 || (ah->attr & A_SELECT))
  1279.               ah->attr = A_READ;
  1280.           }
  1281. !         return cmd;
  1282.           }
  1283.   
  1284.           prev = cur; cur = next;
  1285. --- 444,450 ----
  1286.               if (ah->attr == 0 || (ah->attr & A_SELECT))
  1287.               ah->attr = A_READ;
  1288.           }
  1289. !         return MC_NEXTGROUP;
  1290.           }
  1291.   
  1292.           prev = cur; cur = next;
  1293. ***************
  1294. *** 500,506 ****
  1295.       }
  1296.       }
  1297.   
  1298. !     if (any_message) clrmsg(-1);
  1299.       return map;
  1300.   }
  1301.   
  1302. --- 507,513 ----
  1303.       }
  1304.       }
  1305.   
  1306. !     if (any_message && map != K_LAST_MESSAGE) clrmsg(-1);
  1307.       return map;
  1308.   }
  1309.   
  1310. *** ./LAST/more.c    Tue May 22 12:53:54 1990
  1311. --- more.c    Wed Jun  6 19:21:52 1990
  1312. ***************
  1313. *** 69,74 ****
  1314. --- 69,76 ----
  1315.       'X', "References",    &news.ng_ref,        0,
  1316.       'Y', "Summary",    &news.ng_summ,        0,
  1317.       'd', "Date-Received", &news.ng_rdate,    0,
  1318. +     'g', "Newsgroup",    &news.ng_groups,    0,
  1319. +     'G', "Newsgroup",    &news.ng_groups,    0,
  1320.       'n', "Newsgroups",    &news.ng_groups,    0,
  1321.       'x', "Back-Ref",    &news.ng_bref,        0,
  1322.       0
  1323. ***************
  1324. *** 317,325 ****
  1325.               } else
  1326.               if ((lp = *(hdef->news)) == NULL)
  1327.                   break;
  1328. !             if (*hdrline == 'n')
  1329.               if ((current_group->group_flag & G_MERGED) == 0 &&
  1330.                   strchr(lp, ',') == NULL) break;
  1331.   
  1332.               gotoxy(0, lno++);
  1333.               printf("%s: ", hdef->text);
  1334. --- 319,329 ----
  1335.               } else
  1336.               if ((lp = *(hdef->news)) == NULL)
  1337.                   break;
  1338. !             if (*hdrline == 'n' || *hdrline == 'g')
  1339.               if ((current_group->group_flag & G_MERGED) == 0 &&
  1340.                   strchr(lp, ',') == NULL) break;
  1341. +             if (*hdrline == 'g' || *hdrline == 'G')
  1342. +             lp = current_group->group_name;
  1343.   
  1344.               gotoxy(0, lno++);
  1345.               printf("%s: ", hdef->text);
  1346. ***************
  1347. *** 736,742 ****
  1348.   
  1349.       if (s_hangup) c = K_QUIT;
  1350.   
  1351. !     if (any_message) clrmsg(0);
  1352.   
  1353.       if (c & K_MACRO) {
  1354.       m_invoke(c & ~K_MACRO);
  1355. --- 740,746 ----
  1356.   
  1357.       if (s_hangup) c = K_QUIT;
  1358.   
  1359. !     if (any_message && c != K_LAST_MESSAGE) clrmsg(0);
  1360.   
  1361.       if (c & K_MACRO) {
  1362.       m_invoke(c & ~K_MACRO);
  1363. *** ./LAST/news.c    Tue May 29 18:36:33 1990
  1364. --- news.c    Sat Jun  2 00:58:24 1990
  1365. ***************
  1366. *** 27,32 ****
  1367. --- 27,36 ----
  1368.       date_only     = modes & GET_DATE_ONLY;
  1369.   
  1370.       siz = fread(hdrbuf, sizeof(char), NEWS_HEADER_BUFFER, f);
  1371. +     if (siz <= 0) {
  1372. +     hdrbuf[0] = NUL;
  1373. +     return hdrbuf;
  1374. +     }
  1375.   
  1376.       bp = hdrbuf;
  1377.       bp[siz-1] = NUL;
  1378. *** ./LAST/newsrc.c    Tue May 29 18:36:35 1990
  1379. --- newsrc.c    Fri Jun  8 14:27:21 1990
  1380. ***************
  1381. *** 378,392 ****
  1382.   
  1383.           /* NEW GROUP - ADD TO NEWSRC AS APPROPRIATE */
  1384.   
  1385. -         if (new_group_action == RCX_NEVER) {
  1386. -         gh->group_flag |= G_DONE; /* will not enter sequence */
  1387. -         continue;
  1388. -         }
  1389.           switch (new_group_action) {
  1390.            case RCX_NEVER:
  1391.           /* no not add new groups */
  1392. !         gh->group_flag |= G_DONE;
  1393.           continue;
  1394.   
  1395.            case RCX_HEAD:
  1396. --- 378,387 ----
  1397.   
  1398.           /* NEW GROUP - ADD TO NEWSRC AS APPROPRIATE */
  1399.   
  1400.           switch (new_group_action) {
  1401.            case RCX_NEVER:
  1402.           /* no not add new groups */
  1403. !         gh->group_flag |= G_DONE | G_UNSUBSCRIBED;
  1404.           continue;
  1405.   
  1406.            case RCX_HEAD:
  1407. ***************
  1408. *** 1297,1307 ****
  1409.   
  1410.       if (grep_long) {
  1411.           if (header)
  1412. !         printf("SUBSCR NEW UNREAD SEQUENCE GROUP\n");
  1413.           header = 0;
  1414.   
  1415. !         printf(" %s   %s ",
  1416.              (gh->group_flag & G_UNSUBSCRIBED) ? "no " : "yes",
  1417.              (gh->group_flag & G_NEW) ? "yes" : "no ");
  1418.   
  1419.           if (gh->unread_count > 0)
  1420. --- 1292,1303 ----
  1421.   
  1422.       if (grep_long) {
  1423.           if (header)
  1424. !         printf("SUBSCR IN_RC NEW UNREAD SEQUENCE GROUP\n");
  1425.           header = 0;
  1426.   
  1427. !         printf(" %s   %s   %s ",
  1428.              (gh->group_flag & G_UNSUBSCRIBED) ? "no " : "yes",
  1429. +            (gh->newsrc_line == NULL) ? "no " : "yes",
  1430.              (gh->group_flag & G_NEW) ? "yes" : "no ");
  1431.   
  1432.           if (gh->unread_count > 0)
  1433. ***************
  1434. *** 1498,1504 ****
  1435.       total = groups = 0;
  1436.   
  1437.       if (goback_interact) {
  1438. !     init_term();
  1439.       raw();
  1440.       }
  1441.   
  1442. --- 1494,1500 ----
  1443.       total = groups = 0;
  1444.   
  1445.       if (goback_interact) {
  1446. !     init_term(1);
  1447.       raw();
  1448.       }
  1449.   
  1450. *** ./LAST/nn.c    Tue May 29 18:36:36 1990
  1451. --- nn.c    Mon Jun 11 14:34:36 1990
  1452. ***************
  1453. *** 11,16 ****
  1454. --- 11,19 ----
  1455.   #include "options.h"
  1456.   #include "proto.h"
  1457.   #include "articles.h"
  1458. + #ifdef USE_MALLOC_H
  1459. + #include <malloc.h>
  1460. + #endif
  1461.   
  1462.   import char *bin_directory;
  1463.   
  1464. ***************
  1465. *** 114,129 ****
  1466.       return 0;        /* will not update .newsrc */
  1467.       }
  1468.   
  1469. !     if (proto_lock(I_AM_NN, PL_SET)) {
  1470. !     printf("\nAnother nn process is already running\n\n");
  1471. !     return 1;
  1472. !     }
  1473.   
  1474.       must_unlock = 1;
  1475.       return 0;
  1476.   }
  1477.   
  1478. ! static flag_type setup_access()
  1479.   {
  1480.       flag_type access_mode = 0;
  1481.   
  1482. --- 117,132 ----
  1483.       return 0;        /* will not update .newsrc */
  1484.       }
  1485.   
  1486. !     if (proto_lock(I_AM_NN, PL_SET))
  1487. !     user_error("\nAnother nn process is already running\n\n");
  1488.   
  1489.       must_unlock = 1;
  1490.       return 0;
  1491.   }
  1492.   
  1493. ! #define setup_access()    ACC_PARSE_VARIABLES
  1494. ! flag_type parse_access_flags()
  1495.   {
  1496.       flag_type access_mode = 0;
  1497.   
  1498. ***************
  1499. *** 538,543 ****
  1500. --- 541,562 ----
  1501.       int say_welcome = 0, cmd;
  1502.       flag_type access_mode;
  1503.       char *mask;
  1504. +     extern long initial_memory_break;
  1505. +     extern char *sbrk();
  1506. +     initial_memory_break = (long)sbrk(0);
  1507. + #ifdef USE_MALLOC_H
  1508. + #ifdef MALLOC_MAXFAST
  1509. +     mallopt(M_MXFAST, MALLOC_MAXFAST);
  1510. + #endif
  1511. + #ifdef MALLOC_FASTBLOCKS
  1512. +     mallopt(M_NLBLKS, MALLOC_FASTBLOCKS);
  1513. + #endif
  1514. + #ifdef MALLOC_GRAIN
  1515. +     mallopt(M_GRAIN, MALLOC_GRAIN));
  1516. + #endif
  1517. + #endif
  1518.   
  1519.       pname = program_name(argv);
  1520.   
  1521. ***************
  1522. *** 631,637 ****
  1523.       switch (who_am_i) {
  1524.   
  1525.        case I_AM_NN:
  1526. !     init_term();
  1527.   
  1528.       if (say_welcome) {
  1529.           display_file("adm.welcome", CLEAR_DISPLAY | CONFIRMATION);
  1530. --- 650,656 ----
  1531.       switch (who_am_i) {
  1532.   
  1533.        case I_AM_NN:
  1534. !     init_term(1);
  1535.   
  1536.       if (say_welcome) {
  1537.           display_file("adm.welcome", CLEAR_DISPLAY | CONFIRMATION);
  1538. ***************
  1539. *** 685,691 ****
  1540.   
  1541.        case I_AM_ADMIN:
  1542.       if (argc == 1) {
  1543. !         init_term();
  1544.           visit_init_file(0, (char *)NULL);
  1545.       }
  1546.       admin_mode(argv[1]);
  1547. --- 704,710 ----
  1548.   
  1549.        case I_AM_ADMIN:
  1550.       if (argc == 1) {
  1551. !         init_term(1);
  1552.           visit_init_file(0, (char *)NULL);
  1553.       }
  1554.       admin_mode(argv[1]);
  1555. ***************
  1556. *** 692,698 ****
  1557. --- 711,719 ----
  1558.       nn_exit(0);
  1559.   
  1560.        case I_AM_CHECK:
  1561. +     init_term(0);
  1562.       visit_init_file(0, (char *)NULL);
  1563. +     silent = 0;        /* override setting in init file */
  1564.       group_name_args =
  1565.           parse_options(argc, argv, (char *)NULL, check_options,
  1566.                 " [group]...");
  1567. ***************
  1568. *** 703,708 ****
  1569. --- 724,730 ----
  1570.       break;
  1571.   
  1572.        case I_AM_TIDY:
  1573. +     init_term(0);
  1574.       visit_init_file(0, (char *)NULL);
  1575.       group_name_args = opt_nntidy(argc, argv);
  1576.       break;
  1577. *** ./LAST/nntp.c    Tue May 29 18:36:36 1990
  1578. --- nntp.c    Mon Jun 11 14:34:35 1990
  1579. ***************
  1580. *** 39,46 ****
  1581. --- 39,48 ----
  1582.   #endif
  1583.   
  1584.   #ifdef EXCELAN
  1585. + #ifndef IPPORT_NNTP
  1586.   #define    IPPORT_NNTP    119
  1587.   #endif
  1588. + #endif
  1589.   
  1590.   import char *db_directory, *tmp_directory, *news_active;
  1591.   
  1592. ***************
  1593. *** 276,283 ****
  1594.       if ((sp = getservbyname("nntp", "tcp")) ==  NULL)
  1595.       sys_error("nntp/tcp: Unknown service.\n");
  1596.   
  1597. !     if ((hp = gethostbyname(nntp_server)) == NULL)
  1598. !     sys_error("NNTP server %s unknown.\n", nntp_server);
  1599.   
  1600.       bzero((char *) &sin, sizeof(sin));
  1601.       sin.sin_family = hp->h_addrtype;
  1602. --- 278,289 ----
  1603.       if ((sp = getservbyname("nntp", "tcp")) ==  NULL)
  1604.       sys_error("nntp/tcp: Unknown service.\n");
  1605.   
  1606. !     s = who_am_i == I_AM_MASTER ? 10 : 2;
  1607. !     while ((hp = gethostbyname(nntp_server)) == NULL) {
  1608. !     if (--s < 0)
  1609. !         sys_error("NNTP server %s unknown.\n", nntp_server);
  1610. !     sleep(10);
  1611. !     }
  1612.   
  1613.       bzero((char *) &sin, sizeof(sin));
  1614.       sin.sin_family = hp->h_addrtype;
  1615. ***************
  1616. *** 317,323 ****
  1617.   
  1618.       sin.sin_port = htons(IPPORT_NNTP);
  1619.       machine = nntp_server;
  1620. !     if ((sin.sin_addr.s_addr = rhost(&machine)) < 0)
  1621.           sys_error("%s:  Unknown host.", nntp_server);
  1622.   
  1623.       /* And then connect */
  1624. --- 323,329 ----
  1625.   
  1626.       sin.sin_port = htons(IPPORT_NNTP);
  1627.       machine = nntp_server;
  1628. !     if ((sin.sin_addr.s_addr = rhost(&machine)) == -1)
  1629.           sys_error("%s:  Unknown host.", nntp_server);
  1630.   
  1631.       /* And then connect */
  1632. *** ./LAST/patchlevel.h    Tue May 29 18:36:37 1990
  1633. --- patchlevel.h    Mon Jun 11 09:51:13 1990
  1634. ***************
  1635. *** 15,21 ****
  1636.    *    1990-05-15: Patch #2 (6.4.2) - HIGH
  1637.    *    1990-05-21: Patch #3 (6.4.3) - HIGH
  1638.    *    1990-05-29: Patch #4 (6.4.4) - HIGH
  1639.    */
  1640.   
  1641. ! #define PATCHLEVEL 4
  1642.   
  1643. --- 15,22 ----
  1644.    *    1990-05-15: Patch #2 (6.4.2) - HIGH
  1645.    *    1990-05-21: Patch #3 (6.4.3) - HIGH
  1646.    *    1990-05-29: Patch #4 (6.4.4) - HIGH
  1647. +  *    1990-06-11: Patch #5 (6.4.5) - MEDIUM
  1648.    */
  1649.   
  1650. ! #define PATCHLEVEL 5
  1651.   
  1652. *** ./LAST/term.c    Tue May 29 18:36:39 1990
  1653. --- term.c    Thu Jun  7 13:54:51 1990
  1654. ***************
  1655. *** 20,30 ****
  1656.   extern int s_resized;
  1657.   #endif
  1658.   
  1659.   export char *term_name = NULL;
  1660.   export int  show_current_time = 1;
  1661.   export int  conf_dont_sleep = 0;
  1662.   export int  prompt_length;
  1663. ! export int  terminal_speed;
  1664.   export int  slow_speed = 1200;
  1665.   export int  any_message = 0;
  1666.   export int  flow_control = 1;
  1667. --- 20,37 ----
  1668.   extern int s_resized;
  1669.   #endif
  1670.   
  1671. + struct msg_list {
  1672. +     char *buf;
  1673. +     struct msg_list *prev;
  1674. + };
  1675. + static struct msg_list *msg_stack = NULL, *msg_ptr = NULL;
  1676. + export int  message_history = 15;
  1677.   export char *term_name = NULL;
  1678.   export int  show_current_time = 1;
  1679.   export int  conf_dont_sleep = 0;
  1680.   export int  prompt_length;
  1681. ! export int  terminal_speed = 0;
  1682.   export int  slow_speed = 1200;
  1683.   export int  any_message = 0;
  1684.   export int  flow_control = 1;
  1685. ***************
  1686. *** 38,43 ****
  1687. --- 45,51 ----
  1688.   export key_type delword_key = CONTROL_('W');
  1689.   
  1690.   static char bell_str[256] = "\007";
  1691. + static appl_keypad_mode = 0;
  1692.   
  1693.   #ifdef USE_TERMINFO
  1694.   
  1695. ***************
  1696. *** 69,74 ****
  1697. --- 77,83 ----
  1698.   static char enter_standout_mode[64], exit_standout_mode[64];
  1699.   static char enter_underline_mode[64], exit_underline_mode[64];
  1700.   static char key_down[64], key_up[64], key_right[64], key_left[64];
  1701. + static char keypad_local[64], keypad_xmit[64];
  1702.   
  1703.   int  magic_cookie_glitch;    /* magic cookie size */
  1704.   
  1705. ***************
  1706. *** 295,301 ****
  1707.       terminal_speed = 30;
  1708.   }
  1709.   
  1710. ! init_term()
  1711.   {
  1712.   #ifdef USE_TERMCAP
  1713.       char tbuf[1024];
  1714. --- 304,311 ----
  1715.       terminal_speed = 30;
  1716.   }
  1717.   
  1718. ! init_term(full)
  1719. ! int full;
  1720.   {
  1721.   #ifdef USE_TERMCAP
  1722.       char tbuf[1024];
  1723. ***************
  1724. *** 302,308 ****
  1725.   #endif
  1726.   
  1727.       if ((term_name = getenv("TERM")) == NULL)
  1728. !     user_error("No TERM variable in enviroment");
  1729.   
  1730.   #ifdef HAVE_TERMIO
  1731.       ioctl(0, TCGETA, &norm_tty);
  1732. --- 312,320 ----
  1733.   #endif
  1734.   
  1735.       if ((term_name = getenv("TERM")) == NULL)
  1736. !     user_error("No TERM variable in environment");
  1737. !     if (!full) return;
  1738.   
  1739.   #ifdef HAVE_TERMIO
  1740.       ioctl(0, TCGETA, &norm_tty);
  1741. ***************
  1742. *** 360,365 ****
  1743. --- 372,379 ----
  1744.   
  1745.       opt_cap("ti", enter_ca_mode);
  1746.       opt_cap("te", exit_ca_mode);
  1747. +     opt_cap("ks", keypad_xmit);        /* used to turn "application cursor */
  1748. +     opt_cap("ke", keypad_local);    /* key" mode on and off (sometimes) */
  1749.   
  1750.       if (!use_visible_bell || !opt_cap("vb", bell_str))
  1751.       if (!opt_cap("bl", bell_str))
  1752. ***************
  1753. *** 440,445 ****
  1754. --- 454,467 ----
  1755.       if (HAS_CAP(key_left))
  1756.       enter_multi_key(K_left_arrow, (key_type *)key_left);
  1757.   
  1758. +     appl_keypad_mode = (HAS_CAP(keypad_xmit) && HAS_CAP(keypad_local));
  1759. +     if (!HAS_CAP(key_up)) appl_keypad_mode = 0;    /* no cursor keys */
  1760. +     if (appl_keypad_mode) {
  1761. +     /* Use of ks/ke isn't consistent, so we must guess what to do. */
  1762. +     /* If termcap expects keys to send ESC [, don't switch */
  1763. +     appl_keypad_mode = (key_up[0] != '\033' || key_up[1] != '[');
  1764. +     }
  1765.       visual_on();
  1766.   }
  1767.   
  1768. ***************
  1769. *** 476,481 ****
  1770. --- 498,504 ----
  1771.       tputs(clear_screen, Lines, outc);
  1772.   #endif
  1773.       curxy_c = savxy_c = -1;
  1774. +     msg_ptr = msg_stack;
  1775.   }
  1776.   
  1777.   clrline()
  1778. ***************
  1779. *** 505,510 ****
  1780. --- 528,534 ----
  1781.       gotoxy(0, olineno);
  1782.       fl;
  1783.       }
  1784. +     msg_ptr = msg_stack;
  1785.   }
  1786.   
  1787.   static char so_buf[512], *so_p;
  1788. ***************
  1789. *** 648,653 ****
  1790. --- 672,681 ----
  1791.       putp(enter_ca_mode);
  1792.       is_visual = 1;
  1793.       }
  1794. +     if (appl_keypad_mode) {
  1795. +     putp(keypad_xmit);
  1796. +     is_visual = 1;
  1797. +     }
  1798.   }
  1799.   
  1800.   visual_off()
  1801. ***************
  1802. *** 654,663 ****
  1803.   {
  1804.       int was_raw = is_raw;
  1805.   
  1806. !     if (term_name == NULL) return 0;
  1807.   
  1808. !     if (is_visual && HAS_CAP(exit_ca_mode)) putp(exit_ca_mode), fl;
  1809. !     is_visual = 0;
  1810.   
  1811.       is_raw = 1;
  1812.       unset_raw();
  1813. --- 682,695 ----
  1814.   {
  1815.       int was_raw = is_raw;
  1816.   
  1817. !     if (terminal_speed == 0) return 0;
  1818.   
  1819. !     if (is_visual) {
  1820. !     if (appl_keypad_mode) putp(keypad_local);
  1821. !     if (HAS_CAP(exit_ca_mode)) putp(exit_ca_mode);
  1822. !     fl;
  1823. !     is_visual = 0;
  1824. !     }
  1825.   
  1826.       is_raw = 1;
  1827.       unset_raw();
  1828. ***************
  1829. *** 1381,1389 ****
  1830.       char *fmt;
  1831.       use_vararg;
  1832.   
  1833. !     unset_raw();
  1834. !     clrdisp();
  1835. !     fl;
  1836.   
  1837.       start_vararg;
  1838.       fmt = va_arg1(char *);
  1839. --- 1413,1423 ----
  1840.       char *fmt;
  1841.       use_vararg;
  1842.   
  1843. !     if (terminal_speed != 0) {
  1844. !     clrdisp();
  1845. !     visual_off();
  1846. !     fl;
  1847. !     }
  1848.   
  1849.       start_vararg;
  1850.       fmt = va_arg1(char *);
  1851. ***************
  1852. *** 1406,1420 ****
  1853.       end_vararg;
  1854.   }
  1855.   
  1856.   vmsg(va_tail)
  1857.   va_tdcl
  1858.   {
  1859. !     static char errmsg[512] = "";
  1860. !     char *fmt;
  1861.       fmt = va_arg1(char *);
  1862.   
  1863. !     if (fmt) vsprintf(errmsg, fmt, va_args2toN);
  1864.   
  1865.       gotoxy(0, Lines-1);
  1866.       fputs(errmsg, stdout);
  1867. --- 1440,1494 ----
  1868.       end_vararg;
  1869.   }
  1870.   
  1871. + push_msg(str)
  1872. + char *str;
  1873. + {
  1874. +     register struct msg_list *mp, *newmsg;
  1875. +     static int slots = 0;
  1876. +     
  1877. +     if (str != NULL) {
  1878. +     if (slots > message_history) {
  1879. +         for (mp = newmsg = msg_stack; mp->prev != NULL; mp = mp->prev)
  1880. +         newmsg = mp;
  1881. +         if (newmsg == mp)
  1882. +         msg_stack = NULL;
  1883. +         else {
  1884. +         newmsg->prev = NULL;
  1885. +         newmsg = mp;
  1886. +         }
  1887. +         freeobj(newmsg->buf);
  1888. +     } else {
  1889. +         slots++;
  1890. +         newmsg = newobj(struct msg_list, 1);
  1891. +     }
  1892. +     newmsg->buf = copy_str(str);
  1893. +     newmsg->prev = msg_stack;
  1894. +     msg_stack = newmsg;
  1895. +     }
  1896. +     msg_ptr = msg_stack;
  1897. + }
  1898. +     
  1899.   vmsg(va_tail)
  1900.   va_tdcl
  1901.   {
  1902. !     char *errmsg, *fmt;
  1903. !     
  1904.       fmt = va_arg1(char *);
  1905.   
  1906. !     if (fmt) {
  1907. !     char buf[512];
  1908. !     
  1909. !     vsprintf(buf, fmt, va_args2toN);
  1910. !     push_msg(buf);
  1911. !     }
  1912. !     
  1913. !     if (msg_ptr) {
  1914. !     errmsg = msg_ptr->buf;
  1915. !     msg_ptr = msg_ptr->prev;
  1916. !     } else {
  1917. !     errmsg = "(no more messages)";
  1918. !     msg_ptr = msg_stack;
  1919. !     }
  1920.   
  1921.       gotoxy(0, Lines-1);
  1922.       fputs(errmsg, stdout);
  1923. *** ./LAST/variable.c    Tue May 29 18:36:40 1990
  1924. --- variable.c    Tue Jun 12 09:32:49 1990
  1925. ***************
  1926. *** 73,78 ****
  1927. --- 73,79 ----
  1928.       ignore_xon_xoff,
  1929.       include_art_id,
  1930.       include_full_header,
  1931. +     include_mark_blanks,
  1932.       keep_rc_backup,
  1933.       keep_unsubscribed,
  1934.       keep_unsub_long,
  1935. ***************
  1936. *** 121,131 ****
  1937. --- 122,134 ----
  1938.       expired_msg_delay,
  1939.       first_page_lines,
  1940.       fmt_linenum,
  1941. +     kill_debug,
  1942.       Lines,
  1943.       match_skip_prefix,
  1944.       mark_next_group,
  1945.       mark_read_return,
  1946.       mark_read_skip,
  1947. +     message_history,
  1948.       min_pv_window,
  1949.       new_group_action,
  1950.       newsrc_update_freq,
  1951. ***************
  1952. *** 243,251 ****
  1953. --- 246,256 ----
  1954.       "ignore-xon-xoff",        BOOL 0,        (char **)&ignore_xon_xoff,
  1955.       "include-art-id",        BOOL 0,        (char **)&include_art_id,
  1956.       "include-full-header",    BOOL 0,        (char **)&include_full_header,
  1957. +     "include-mark-blank-lines",    BOOL 0,        (char **)&include_mark_blanks,
  1958.       "included-mark",        STR 1,        (char **)included_mark,
  1959.       "keep-unsubscribed",     BOOL 0,        (char **)&keep_unsubscribed,
  1960.       "kill",            BOOL 0,        (char **)&do_kill_handling,
  1961. +     "kill-debug",        BOOL 0,        (char **)&kill_debug,
  1962.       "kill-key",            KEY 0,        (char **)&kill_key,
  1963.       "layout",            INT 1,        (char **)&fmt_linenum,
  1964.       "limit",            INT 2,        (char **)&article_limit,
  1965. ***************
  1966. *** 263,268 ****
  1967. --- 268,274 ----
  1968.       "marked-by-next-group",    INT 0,        (char **)&mark_next_group,
  1969.       "marked-by-read-return",    INT 0,        (char **)&mark_read_return,
  1970.       "marked-by-read-skip",    INT 0,        (char **)&mark_read_skip,
  1971. +     "message-history",        INT 0,        (char **)&message_history,
  1972.       "min-window",        INT 1,        (char **)&min_pv_window,
  1973.       "mmdf-format",        BOOL 0,        (char **)&use_mmdf_folders,
  1974.       "monitor",            BOOL 0,        (char **)&monitor_mode,
  1975. ***************
  1976. *** 370,381 ****
  1977.   }
  1978.   
  1979.   
  1980.   static adjust(str)
  1981.   register char *str;
  1982.   {
  1983. !     if (str == NULL) return;
  1984. !     while (*str && !isspace(*str) && *str != '#') str++;
  1985. !     *str = NUL;
  1986.   }
  1987.   
  1988.   set_variable(variable, on, val_string)
  1989. --- 376,422 ----
  1990.   }
  1991.   
  1992.   
  1993. + static char escaped_char(c)
  1994. + char c;
  1995. + {
  1996. +     switch (c) {
  1997. +      case 'a':
  1998. +     return 007;
  1999. +      case 'b':
  2000. +     return BS;
  2001. +      case 'e':
  2002. +     return 033;
  2003. +      case 'f':
  2004. +     return '\f';
  2005. +      case 'n':
  2006. +     return NL;
  2007. +      case 'r':
  2008. +     return CR;
  2009. +      case 't':
  2010. +     return TAB;
  2011. +     }
  2012. +     return c;
  2013. + }
  2014.   static adjust(str)
  2015.   register char *str;
  2016.   {
  2017. !     register char *s, *t;
  2018. !     if ((s = t = str) == NULL) return;
  2019. !     while (*s && *s != '#') {
  2020. !     if (*s == '\\' && s[1] != NUL) {
  2021. !         s++;
  2022. !         *str++ = escaped_char(*s++);
  2023. !     } else
  2024. !     if (str == s) {
  2025. !         str++;
  2026. !         if (isspace(*s++)) continue;
  2027. !     } else
  2028. !         if (isspace(*str++ = *s++)) continue;
  2029. !     t = str;
  2030. !     }
  2031. !     *t = NUL;
  2032.   }
  2033.   
  2034.   set_variable(variable, on, val_string)
  2035. ***************
  2036. *** 417,422 ****
  2037. --- 458,465 ----
  2038.   
  2039.        case V_STRING:
  2040.   
  2041. +     if (on) adjust(val_string);
  2042.       switch (VAR_OP) {
  2043.        case 0:
  2044.           STR_VAR = (on && val_string) ? copy_str(val_string) : (char *)NULL;
  2045. ***************
  2046. *** 430,436 ****
  2047.           if (on) {
  2048.           char exp_buf[FILENAME];
  2049.   
  2050. -         adjust(val_string);
  2051.           if (val_string) {
  2052.               if (expand_file_name(exp_buf, val_string, 1))
  2053.               STR_VAR = home_relative(exp_buf);
  2054. --- 473,478 ----
  2055. ***************
  2056. *** 871,877 ****
  2057.       home();
  2058.       }
  2059.       pg_next();
  2060. !     so_printf("\1Variable settings:\1");
  2061.   
  2062.       for (var = variables; var < &variables[TABLE_SIZE]; var++) {
  2063.       pushed =
  2064. --- 913,919 ----
  2065.       home();
  2066.       }
  2067.       pg_next();
  2068. !     so_printf("Variable settings:");
  2069.   
  2070.       for (var = variables; var < &variables[TABLE_SIZE]; var++) {
  2071.       pushed =
  2072. *** ./LAST/xmakefile    Wed May 16 11:23:59 1990
  2073. --- xmakefile    Tue Jun 12 09:44:57 1990
  2074. ***************
  2075. *** 16,21 ****
  2076. --- 16,29 ----
  2077.   #define EXTRA_LIB
  2078.   #endif
  2079.   
  2080. + #ifndef NNTP
  2081. + #undef NNTP_EXTRA_LIB
  2082. + #endif
  2083. + #ifndef NNTP_EXTRA_LIB
  2084. + #define NNTP_EXTRA_LIB
  2085. + #endif
  2086.   #ifdef HAVE_ROUTING
  2087.   #define NNMAIL
  2088.   #else
  2089. ***************
  2090. *** 79,89 ****
  2091.   
  2092.   nn:    $(NN)
  2093.       @echo linking nn
  2094. !     @$(CC) $(CFLAGS) $(NN) TERMLIB EXTRA_LIB -o nn
  2095.   
  2096.   nnmaster: $(MASTER)
  2097.       @echo linking nnmaster
  2098. !     @$(CC) $(CFLAGS) $(MASTER) EXTRA_LIB -o nnmaster
  2099.   
  2100.   nnmail:    $(MAIL)
  2101.       @echo linking nnmail
  2102. --- 87,97 ----
  2103.   
  2104.   nn:    $(NN)
  2105.       @echo linking nn
  2106. !     @$(CC) $(CFLAGS) $(NN) -o nn TERMLIB EXTRA_LIB NNTP_EXTRA_LIB
  2107.   
  2108.   nnmaster: $(MASTER)
  2109.       @echo linking nnmaster
  2110. !     @$(CC) $(CFLAGS) $(MASTER) -o nnmaster EXTRA_LIB NNTP_EXTRA_LIB
  2111.   
  2112.   nnmail:    $(MAIL)
  2113.       @echo linking nnmail
  2114. ***************
  2115. *** 161,166 ****
  2116. --- 169,175 ----
  2117.   
  2118.   clean:
  2119.       rm -f $(BIN_PROG) $(LIB_PROG) $(MASTER_PROG) cvt-help usercheck
  2120. +     rm -f prefix mkprefix inst
  2121.   
  2122.   *
  2123.   * dependencies
  2124.